package com.bootdo.zyyEChartsDemo;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.io.Serializable;

@Controller
@RequestMapping("/zyyEChartsDemo/zyyEChartsDemo")
public class ZyyEChartsDemo {

    @ResponseBody
    @GetMapping("/demo")
    public Object demo(){
        DemoDo demoDo = new DemoDo();

        Title title = new Title();
        title.setTitle("111");
        demoDo.setTitle(title);

        Legend legend = new Legend();
        legend.setLegend("222");
        demoDo.setLegend(legend);

        XAxis xAxis = new XAxis();
        xAxis.setxAxis("333");
        demoDo.setxAxis(xAxis);

        YAxis yAxis = new YAxis();
        yAxis.setyAxis("444");
        demoDo.setyAxis(yAxis);

        Series series = new Series();
        series.setSeries("555");
        demoDo.setSeries(series);

        return demoDo;
    }

}

class DemoDo implements Serializable{
    private Title title;
    private Tooltip tooltip;
    private Legend legend;
    private XAxis xAxis;
    private YAxis yAxis;
    private Series series;

    public Title getTitle() {
        return title;
    }

    public void setTitle(Title title) {
        this.title = title;
    }

    public Tooltip getTooltip() {
        return tooltip;
    }

    public void setTooltip(Tooltip tooltip) {
        this.tooltip = tooltip;
    }

    public Legend getLegend() {
        return legend;
    }

    public void setLegend(Legend legend) {
        this.legend = legend;
    }

    public XAxis getxAxis() {
        return xAxis;
    }

    public void setxAxis(XAxis xAxis) {
        this.xAxis = xAxis;
    }

    public YAxis getyAxis() {
        return yAxis;
    }

    public void setyAxis(YAxis yAxis) {
        this.yAxis = yAxis;
    }

    public Series getSeries() {
        return series;
    }

    public void setSeries(Series series) {
        this.series = series;
    }
}

class Title {
    private String title;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
class Tooltip{
    private String tooltip;

    public String getTooltip() {
        return tooltip;
    }

    public void setTooltip(String tooltip) {
        this.tooltip = tooltip;
    }
}
class Legend{
    private String legend;

    public String getLegend() {
        return legend;
    }

    public void setLegend(String legend) {
        this.legend = legend;
    }
}
class XAxis{
    private String xAxis;

    public String getxAxis() {
        return xAxis;
    }

    public void setxAxis(String xAxis) {
        this.xAxis = xAxis;
    }
}
class YAxis{
    private String yAxis;

    public String getyAxis() {
        return yAxis;
    }

    public void setyAxis(String yAxis) {
        this.yAxis = yAxis;
    }
}
class Series{
    private String series;

    public String getSeries() {
        return series;
    }

    public void setSeries(String series) {
        this.series = series;
    }
}